/**
 * Copyright (c) 2009-2011, chunquedong(YangJiandong)
 * 
 * This file is part of ChunMap project
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
 * 
 * History:
 *     2010-05-05  Jed Young  Creation
 */
package chunmap.model.geom;

import java.util.List;

/**
 * @author chunquedong
 * 
 */
public class MultiPoint extends MultiGeometry<GeoPoint> {

	public MultiPoint(List<GeoPoint> pointList) {
		super(pointList);
	}
	
	@Override
	public String toString() {
		StringBuilder str = new StringBuilder();
		str.append("MULTIPOINT(");
		for (GeoPoint p : geometrys) {
			str.append(p.getX() + " " + p.getY() + ",");
		}
		str.deleteCharAt(str.lastIndexOf(","));
		str.append(")");
		return str.toString();
	}

	@Override
	public GeometryType getGeometryType() {
		return GeometryType.MultiPoint;
	}
}